using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace HRM.Models.Mapping
{
    public class tk_QLSuPhamMap : EntityTypeConfiguration<tk_QLSuPham>
    {
        public tk_QLSuPhamMap()
        {
            // Primary Key
            this.HasKey(t => t.Id);

            // Properties
            this.Property(t => t.TenNV)
                .HasMaxLength(50);

            this.Property(t => t.MaDDKy)
                .HasMaxLength(50);

            this.Property(t => t.cnlSolop1)
                .HasMaxLength(50);

            this.Property(t => t.cnlSolop2)
                .HasMaxLength(50);

            this.Property(t => t.cnlTongsinhhoat1)
                .HasMaxLength(50);

            this.Property(t => t.cnlTongsinhhoat2)
                .HasMaxLength(50);

            this.Property(t => t.tgHopKhoa1)
                .HasMaxLength(50);

            this.Property(t => t.tgHopKhoa2)
                .HasMaxLength(50);

            this.Property(t => t.tgTrucKhoa1)
                .HasMaxLength(50);

            this.Property(t => t.tgTrucKhoa2)
                .HasMaxLength(50);

            this.Property(t => t.tgDugio1)
                .HasMaxLength(50);

            this.Property(t => t.tgDugio2)
                .HasMaxLength(50);

            this.Property(t => t.hdtsTrogiang1)
                .HasMaxLength(50);

            this.Property(t => t.hdtsTrogiang2)
                .HasMaxLength(50);

            this.Property(t => t.hdKhac)
                .HasMaxLength(500);

            // Table & Column Mappings
            this.ToTable("tk_QLSuPham");
            this.Property(t => t.Id).HasColumnName("Id");
            this.Property(t => t.TenNV).HasColumnName("TenNV");
            this.Property(t => t.MaDDKy).HasColumnName("MaDDKy");
            this.Property(t => t.cnlSolop1).HasColumnName("cnlSolop1");
            this.Property(t => t.cnlSolop2).HasColumnName("cnlSolop2");
            this.Property(t => t.cnlTongsinhhoat1).HasColumnName("cnlTongsinhhoat1");
            this.Property(t => t.cnlTongsinhhoat2).HasColumnName("cnlTongsinhhoat2");
            this.Property(t => t.tgHopKhoa1).HasColumnName("tgHopKhoa1");
            this.Property(t => t.tgHopKhoa2).HasColumnName("tgHopKhoa2");
            this.Property(t => t.tgTrucKhoa1).HasColumnName("tgTrucKhoa1");
            this.Property(t => t.tgTrucKhoa2).HasColumnName("tgTrucKhoa2");
            this.Property(t => t.tgDugio1).HasColumnName("tgDugio1");
            this.Property(t => t.tgDugio2).HasColumnName("tgDugio2");
            this.Property(t => t.hdtsTrogiang1).HasColumnName("hdtsTrogiang1");
            this.Property(t => t.hdtsTrogiang2).HasColumnName("hdtsTrogiang2");
            this.Property(t => t.hdKhac).HasColumnName("hdKhac");
        }
    }
}
